package com.nuorui.module.system.domain.form;


import com.nuorui.common.utils.SmartVerificationUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @author Fred
 */
@Data
public class UserForm {

	@ApiModelProperty(value = "姓名")
	@NotNull(message = "姓名不能为空")
	@Size(max = 30, message = "姓名最多30字符")
	private String actualName;

	@ApiModelProperty(value = "登录账号")
	@NotNull(message = "登录账号不能为空")
	@Size(max = 30, message = "登录账号最多30字符")
	private String loginName;

	@ApiModelProperty(value = "性别")
	private Integer gender;

	@ApiModelProperty(value = "部门id")
	@NotNull(message = "部门id不能为空")
	private Long departmentId;

	@ApiModelProperty(value = "是否启用")
	@NotNull(message = "是否被禁用不能为空")
	private Boolean disabledFlag;

	@ApiModelProperty(value = "手机号")
	@NotNull(message = "手机号不能为空")
	@Pattern(regexp = SmartVerificationUtil.PHONE_REGEXP, message = "手机号格式不正确")
	private String phone;

	@ApiModelProperty(value = "邮箱账号")
	@NotNull(message = "邮箱账号不能为空")
	@Pattern(regexp = SmartVerificationUtil.EMAIL, message = "邮箱账号格式不正确")
	private String email;

	@ApiModelProperty(value = "职务级别ID")
	private Long positionId;

	@ApiModelProperty(value = "角色列表")
	private List<Long> roleIdList;

	@ApiModelProperty(value = "备注")
	@Size(max = 200, message = "备注最多200字符")
	private String remark;

}
